package com.zhanghang.vending_machine.service;

import com.zhanghang.vending_machine.common.result.PageResult;
import com.zhanghang.vending_machine.domain.dto.GoodDto;
import com.zhanghang.vending_machine.domain.po.Good;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhanghang.vending_machine.domain.vo.GoodVo;

/**
* @author ASUS
* @description 针对表【good】的数据库操作Service
* @createDate 2024-11-05 18:10:48
*/
public interface GoodService extends IService<Good> {

    /**
     * 新增商品
     * @param goodDto
     */
    void addGood(GoodDto goodDto);

    /**
     * 条件分页查询
     * @param categoryId
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageResult PageByCategory(Long categoryId, Long pageNo, Long pageSize);

    /**
     * 根据id查询商品
     * @param id
     * @return
     */
    GoodVo getGoodById(Long id);
}
